﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassifierLib.Classifier.Filters;
using ClassifierLib.Environment;
using ClassifierLib;

using System.ComponentModel;

namespace ExampleStudentProject
{
    // Please note: these classes are xml serialised, so if you add public properties to the class they will be restored correctly when loading a saved LCS. If you add private variables these will NOT be saved/restored when the LCS is opened.
    public class FunkyFilter : Cover 
    {
        public FunkyFilter()
        {
            Name = "Funky Filter";
        }

        public override Population Apply(Population Population, Population Selected, State State, ClassifierLib.Action Action)
        {
            // Do nothing example filter
            return Selected;
        }

        #region Custom filter parameters
        private string _blah;
        /// <summary>
        /// Student defined variable
        /// </summary>
        [CategoryAttribute("Funky Settings"), Browsable(true), ReadOnly(false), BindableAttribute(false), DesignOnly(false), DescriptionAttribute("first custom variable")]
        public string Blah
        {
            get
            {
                return _blah;
            }
            set
            {
                _blah = value;
                OnPropertyChanged("Blah");
            }
        }

        private double _blahBlah;
        /// <summary>
        /// This is the minumum number of matched rules before covering
        /// </summary>
        [CategoryAttribute("Funky Settings"), Browsable(true), ReadOnly(false), BindableAttribute(false), DesignOnly(false), DescriptionAttribute("second custom variable")]
        public double BlahBlah
        {
            get
            {
                return _blahBlah;
            }
            set
            {
                _blahBlah = value;
                OnPropertyChanged("BlahBlah");
            }
        }

        private int _blahBlahBlah;
        /// <summary>
        /// This is the minumum number of matched rules before covering
        /// </summary>
        [CategoryAttribute("Funky Settings"), Browsable(true), ReadOnly(false), BindableAttribute(false), DesignOnly(false), DescriptionAttribute("third custom variable")]
        public int BlahBlahBlah
        {
            get
            {
                return _blahBlahBlah;
            }
            set
            {
                _blahBlahBlah = value;
                OnPropertyChanged("BlahBlahBlah");
            }
        }
        #endregion
    }
}
